﻿#pragma once

#include "Extensionsystem_Global.h"
#include <QObject>
namespace CVV
{

namespace Infrastructure
{

namespace ExtensionSystem
{

class PluginSpec;
/**
 * @brief The IPlugin class
 * 定义插件接口
 */
class EXTENSIONSYSTEM_EXPORT IPlugin : public QObject
{
    Q_OBJECT
public:

    IPlugin();
    virtual ~IPlugin();
    /***********************************************************************
     *  @function initialize
     *  @brief 插件初始化
     *  @param arguments 参数
     *  @param errorString 错误信息
     *  @return 返回初始化是否成功
    ***********************************************************************/
    virtual bool initialize(const QStringList &arguments, QString *errorString) = 0;
    virtual void extensionsInitialized() {}
    PluginSpec *pluginSpec;
};

}

}

} // namespace TriInterface
